import Vue from 'vue'
import Router from 'vue-router'
import Index from "../components/Index";
import PaymentSuccess from "../components/PaymentSuccess";
import List from "../components/List";
import PaymentFail from "../components/PaymentFail";
import OrderRecord from "../components/OrderRecord";
import UserLogin from "../components/UserLogin";
import UserRegister from "../components/UserRegister";
import BusinessLogin from "../components/BusinessLogin";
import BusinessRegister from "../components/BusinessRegister";
import Shopping_cart from "../components/Shopping_cart";
import Shopping_cart_noccon from "../components/Shopping_cart_noccon";
import Shopping_payment from "../components/Shopping_payment";
import Carte from "../components/Carte";
import Assess from "../components/Assess";
import SystemMain from "../components/SystemMain";
import StoreManger from "../components/StoreManger";
import StoreBackStageManage from "../components/backstage/StoreBacksStageManage";
import StoreInfo from "../components/backstage/StoreInfo"
import ProductsInfo from "../components/backstage/ProductsInfo"
import FoodManage from "../components/backstage/FoodManage"
import ApprovalManger from "../components/ApprovalManger";
import OrderByStore from "../components/backstage/OrderByStore"
import Test from "../components/Test"

Vue.use(Router)

let router=new Router({
  routes: [
    {
      path: '/',
      component:Index
    },
    {
      path:"/storeBackStageManage",
      component:StoreBackStageManage,
      children:[
        // {
        //   path:"/storeBackStageManage/storeInfo",
        //   component:StoreInfo,
        // },
        // {
        //   path:"/storeBackStageManage/productsInfo",
        //   component:ProductsInfo
        // },
        // {
        //   path:"/storeBackStageManage/foodManage",
        //   component: FoodManage
        // },
        // {
        //   path: "/storeBackStageManage/storeOrder",
        //   component: OrderByStore
        // },
        // {
        //   path:"/storeManger",
        //   component: StoreManger
        // },
        // {
        //   path: "/approval",
        //   component: ApprovalManger
        // }
      ]
    },
    {
      path: "/paymentSuccess",
      component: PaymentSuccess
    },{
      path:"/list",
      component:List
    },
    {
      path: "/paymentFail",
      component: PaymentFail
    },
    {
      path: "/orderRecord",
      component: OrderRecord
    },
    {
      path:"/userLogin",
      component: UserLogin
    },
    {
      path: "/userRegister",
      component: UserRegister
    },
    {
      path: "/businessLogin",
      component: BusinessLogin
    },
    {
      path: "/businessRegister",
      component: BusinessRegister
    }
    ,
    {
      path: "/shopping_cart_noccon",
      component: Shopping_cart_noccon
    }
    ,
    {
      path: "/shopping_payment",
      component: Shopping_payment
    }
    ,
    {
      path: "/shopping_car",
      component: Shopping_cart
    }
    ,
    {
      path: "/carte",
      component: Carte
    },
    {
      path: "/assess",
      component: Assess
    },
    {
      path: "/systemMain",
      component: SystemMain,
      children:[
        {
          path:"/storeManger",
          component: StoreManger
        },
        {
          path: "/approval",
          component: ApprovalManger
        },
        {
          path:"/storeBackStageManage/storeInfo",
          component:StoreInfo,
        },
        {
          path:"/storeBackStageManage/productsInfo",
          component:ProductsInfo
        },
        {
          path:"/storeBackStageManage/foodManage",
          component: FoodManage
        },
        {
          path: "/storeBackStageManage/storeOrder",
          component: OrderByStore
        },
      ],
      redirect:"/storeManger"
    },
    {
      path: "/test",
      component: Test
    }
  ]
})


export default router;
